package at.fhj.swd.pse.entities;

import java.io.Serializable;

import javax.enterprise.context.SessionScoped;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.Index;

@SessionScoped
@Entity
@Table(name = "departments")

public class Department implements Serializable {
	
	private static final long serialVersionUID = 1L;

	private int id;
	private String name;
	private String description;

	public Department() {
		super();
	}

	@Id
	@GeneratedValue
	public int getId() {
		return this.id;
	}

	public void setId(final int id) {
		this.id = id;
	}

	@Index(name = "IX_departments_name")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

}
